package com.zjw.zy.datasource.dao;

import androidx.annotation.NonNull;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.zjw.zy.bean.MemorandumItem;
import com.zjw.zy.bean.RecorderItem;

import java.util.List;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/10/18 8:52
 */
@Dao
public interface RecorderDao {
    @Insert
    void insertItem(@NonNull RecorderItem item);


    @Delete
    void deleteItem(@NonNull RecorderItem item);


    @Update
    void updateItem(@NonNull RecorderItem item);


    @Query("SELECT * FROM recorder ORDER BY date DESC")
    List<RecorderItem> queryAll();
}
